<template>
	<view class="wrap">
		<view class="block">
			<view class="item">
				<view class="item-L">企业logo</view>
				<view class="item-R">
					<view class="logo">
						<image :src="gShopInfo.logoImg"></image>
					</view>
				</view>
			</view>
			<view class="item">
				<view class="item-L">店铺名称</view>
				<view class="item-R">{{gShopInfo.name}}</view>
			</view>
			<view class="item">
				<view class="item-L">电话</view>
				<view class="item-R">{{gUserInfo.tel}}</view>
			</view>
			<!-- <view class="item">
				<view class="item-L">传真</view>
				<view class="item-R">{{gShopInfo.name}}</view>
			</view> -->
			<view class="item">
				<view class="item-L">档口地址</view>
				<view class="item-R">{{gShopInfo.address}}</view>
			</view>
			<view class="item">
				<view class="item-L">仓库地址</view>
				<view class="item-R">{{gShopInfo.repositoryAddress}}</view>
			</view>
		</view>
		<view class="block">
			<view class="block-header">银行卡信息</view>
			<view class="bankCardList" v-for="(item, index) in bankcarList" :key="index">
				<view class="item">
					<view class="item-L">银行名称</view>
					<view class="item-R">{{item.bankName}}</view>
				</view>
				<view class="item">
					<view class="item-L">银行卡号</view>
					<view class="item-R">{{item.cardNumber}}</view>
				</view>
				<view class="item">
					<view class="item-L">户名</view>
					<view class="item-R">{{item.name}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shopInfo: {},
				bankcarList: []
			}
		},
		onLoad(options) {
			// this.getShopInfo()
			this.$store.dispatch('updateUserInfo')
			this.getBankList()
		},
		methods: {
			// getShopInfo() {
			// 	this.$g_api.shopDetailShop().then(({
			// 		data
			// 	}) => {
			// 		this.shopInfo = data
			// 	})
			// }
			getBankList() {
				this.$g_api.bankcarList({
					pageNum: 1,
					pageSize: 1000,
				}).then(({
					rows,
					totalPage
				}) => {
					this.bankcarList = rows
					console.log(rows);
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.block {
		margin-bottom: 20rpx;

		&:nth-child(1) {
			margin-bottom: 0;
			border-top: 1px solid $g-border-color;
		}
	}

	.block-header {
		line-height: 80rpx;
		padding-left: 30rpx;
		font-size: 30rpx;
		color: #666;
	}

	.bankCardList {
		margin-bottom: 20rpx;
	}

	.item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 100rpx;
		padding: 30rpx;
		box-sizing: border-box;
		border-bottom: 1px solid $g-border-color;
		background-color: #fff;
	}

	.item-L {
		font-size: 30rpx;
		color: #666;
	}

	.item-R {
		font-size: 30rpx;
		color: #333;

		.logo {
			font-size: 0;

			image {
				width: 120rpx;
				height: 120rpx;
				background-color: #ccc;
			}
		}
	}
</style>
